
def file_generator(name, content):
    content = "Hello %s!\n" % name + content
    native.genrule(
        name = name + "_gen",
        outs = [name + ".txt"],
        cmd = "echo \"%s\" > $@" % content,
    )